home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / clock344.zip / IOCTL.H < prev    next >
C/C++ Source or Header  |  1993-03-09  |  4KB  |  111 lines

  1. /****************************************************************************/
  2. /*                THE FOLLOWING PROGRAM IS THE SOLE PROPERTY OF             */
  3. /*                               RONALD Q. SMITH                            */
  4. /*             CONTAINING HIS PROPRIETARY CONFIDENTIAL INFORMATION          */
  5. /*                 COPYRIGHT (c) RONALD Q. SMITH 1992, 1993                 */
  6. /****************************************************************************/
  7.  
  8. /* Version of this software.                                                */
  9.  
  10. #define version "3.44"
  11.  
  12. /* Global data types.                                                       */
  13.  
  14. /* "modes" holds flags that control the operation of CLOCK.SYS              */
  15.  
  16. struct modes {
  17.     unsigned : 9;
  18.     unsigned day_light: 1;
  19.     unsigned disp_24 : 1;
  20.     unsigned disp_tim : 1;
  21.     unsigned pw_ena : 1;
  22.     unsigned disabl : 1;
  23.     unsigned chk_forw : 1;
  24.     unsigned chk_back : 1;
  25. };
  26.  
  27. /* "off" holds a time offset in hours, minutes, and seconds.                */
  28.  
  29. struct off {
  30.     int hour;
  31.     int minute;
  32.     int second;
  33. };
  34.  
  35. /* "date_time" is a structure that holds a date and time.                   */
  36.  
  37. struct date_time {
  38.     int year;
  39.     int month;
  40.     int day;
  41.     struct off time;
  42.     int hsecond;
  43. };
  44.  
  45. /* "time_zone" holds a time zone name and offset.                           */
  46.  
  47. struct time_zone {
  48.     struct off offs;
  49.     unsigned char zone[32];
  50. };
  51.  
  52. /* "limit" is used to hold the data that sets time limits for changes.      */
  53.  
  54. struct limit {
  55.     struct off back;
  56.     struct off forward;
  57. };
  58. /* "disp" is used to hold the data that specifies the location and attributes
  59.     of the continuous time display.                                         */
  60.  
  61. struct disp {
  62.     int x;
  63.     int y;
  64.     int attribute;
  65. };
  66.  
  67. /* CLOCK_DATA is the CLOCK.SYS data that is returned by clksta (AKA CLKSTA
  68.    for FORTRAN, Pascal, and BASIC languages).  Because we need to be language
  69.    independent, all of the data is word-aligned.  Only the data types int and
  70.    character are used.  Some of the int data is encoded bits or addresses.  */
  71.  
  72. struct CLOCK_DATA {
  73.     int connected;                      /* Connection state             */
  74.     struct modes mode;                  /* Mode bits                    */
  75.     struct date_time cal_time;          /* Current date and time        */
  76.     struct time_zone standard;          /* Offset of standard UTC       */
  77.     struct time_zone daylight;          /* Daylight offset              */
  78.     struct limit rules;                 /* Maximum clock movement       */
  79.     struct disp display;                /* Time display loc and attr    */
  80.     unsigned char vers[6];              /* CLOCK.SYS version nnn.nn     */
  81.     int clock_type;                     /* Type of clock installed      */
  82.     int ct_1;                           /* Data for clock type          */
  83.     int ct_2;
  84.     int ct_3;
  85.     int ct_4;
  86.     unsigned int clock_seg;             /* Segment CLOCK.SYS loaded at  */
  87.     unsigned int clock_long;            /* Size of CLOCK.SYS            */
  88. };
  89.  
  90. /* Function prototypes                                                      */
  91.  
  92. extern int pascal far connec(int *connect);
  93. extern int pascal far stzone(int *std_hour, int *std_minute, int *std_second,
  94.     unsigned char std_name[32], int *day_hour, int *day_minute,
  95.     int *day_second, unsigned char day_name[32]);
  96. extern int pascal far stmode(struct modes *mode);
  97. extern int pascal far rstrct(int *back_hour, int *back_minute,
  98.     int *back_second,int *forward_hour, int *forward_minute,
  99.     int *forward_second);
  100. extern int pascal far tdisp(int *disp_x, int *disp_y, int *attribute);
  101. extern void pascal far setpw(unsigned char *pword);
  102. extern int pascal far newpw(unsigned char *pword);
  103. extern int pascal far clksta(struct CLOCK_DATA *data);
  104.  
  105. /****************************************************************************/
  106. /*                THE PRECEDING PROGRAM IS THE SOLE PROPERTY OF             */
  107. /*                               RONALD Q. SMITH                            */
  108. /*             CONTAINING HIS PROPRIETARY CONFIDENTIAL INFORMATION          */
  109. /*                 COPYRIGHT (c) RONALD Q. SMITH 1992, 1993                 */
  110. /****************************************************************************/
  111.